import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    redirect:'/index',
    children:[
      {
        path: '/index',
        name: 'Index',
        component: () => import(/* webpackChunkName: "about" */ '../views/Index.vue')
      },
      {
        path: '/login',
        name: 'Login',
        component: () => import(/* webpackChunkName: "about" */ '../views/Login.vue')
      },
      {
        path: '/enroll',
        name: 'Enroll',
        component: () => import(/* webpackChunkName: "about" */ '../views/Enroll.vue'),
      },
      {
        path: '/html',
        name: 'Html',
        component: () => import(/* webpackChunkName: "about" */ '../views/Html.vue'),
      },
      {
        path: '/wang',
        name: 'Wang',
        component: () => import(/* webpackChunkName: "about" */ '../views/Wang.vue'),
      },
      {
        path: '/detail/:id',
        name: 'Detail',
        component: () => import(/* webpackChunkName: "about" */ '../views/Detail.vue'),
      },
    ]
  },

  {
    path: '/flag',
    name: 'Flag',
    component: () => import(/* webpackChunkName: "about" */ '../views/Flag.vue')
  },
  {
    path: '/man',
    name: 'Man',
    component: () => import(/* webpackChunkName: "about" */ '../views/Man.vue')
  },
  {
    path: '/woman',
    name: 'Woman',
    component: () => import(/* webpackChunkName: "about" */ '../views/Woman.vue')
  },
  {
    path: '/kids',
    name: 'Kids',
    component: () => import(/* webpackChunkName: "about" */ '../views/Kids.vue')
  },
  {
    path: '/antakids',
    name: 'Antakids',
    component: () => import(/* webpackChunkName: "about" */ '../views/Antakids.vue')
  },
  {
    path: '/brand',
    name: 'Brand',
    component: () => import(/* webpackChunkName: "about" */ '../views/Brand.vue')
  },
  {
    path: '/advert',
    name: 'Advert',
    component: () => import(/* webpackChunkName: "about" */ '../views/Advert.vue')
  },
  {
    path: '/contact',
    name: 'Contact',
    component: () => import(/* webpackChunkName: "about" */ '../views/Contact.vue')
  },
]

const router = new VueRouter({
  routes
})

export default router
